// storageAdapter.js
export const storage = {
  getItem(key) {
    try {
      return uni.getStorageSync(key);
    } catch (error) {
      console.error('Failed to get item from storage:', error);
      return null;
    }
  },
  setItem(key, value) {
    try {
      uni.setStorageSync(key, value);
    } catch (error) {
      console.error('Failed to set item in storage:', error);
    }
  },
  removeItem(key) {
    try {
      uni.removeStorageSync(key);
    } catch (error) {
      console.error('Failed to remove item from storage:', error);
    }
  }
};